# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-streamlit
_pkgname=streamlit
pkgver=1.47.1
pkgrel=1
pkgdesc='A faster way to build and share data apps.'
arch=('any')
url='https://pypi.org/project/streamlit/#files'
license=('MIT')
depends=('python' 'python-altair' 'python-blinker' 'python-cachetools'
         'python-click' 'python-numpy' 'python-packaging' 'python-pandas'
         'python-pillow' 'python-protobuf' 'python-pyarrow' 'python-requests'
         'python-rich' 'python-tenacity' 'python-toml'
         'python-typing_extensions' 'python-watchdog')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('840ff503fd9db2c461f4a7e7365aae924abefe5c3941c138a1bdc0d05be967f7940e029af9f47dac3e68616868e92f4f19474eb76bf60d2c6799e0477434ba93')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

